package com.qifan.energy.activity;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

import com.qifan.energy.base.BaseActivity;
import com.qifan.energy.R;
import com.qifan.energy.adapter.CollegeListAdapter;
import com.qifan.energy.util.IntentUtils;
import com.yqritc.recyclerviewflexibledivider.HorizontalDividerItemDecoration;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

public class MyCollectActivity extends BaseActivity {

    @BindView(R.id.recycler_view)
    RecyclerView recyclerView;

    private List<String> dataList = new ArrayList(){{
        add("hahahha1");
    }};

    /*@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_collect);
    }*/

    @Override
    protected int getLayoutId() {
        return R.layout.activity_my_collect;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {

        /* 更改状态栏 */
        changeStatusTransparentFontBlack();

        /* 适配器设置 */
        CollegeListAdapter adapter = new CollegeListAdapter(dataList);
        adapter.setOnItemClickListener((a,v,p) -> {
            IntentUtils.startActivity(this, AddressUpdateActivity.class);
        });
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        recyclerView.setAdapter(adapter);
        recyclerView.addItemDecoration(new HorizontalDividerItemDecoration.Builder(this)
                .sizeResId(R.dimen.dp_10)
                .colorResId(R.color.divider_color)
                .build());
    }

    @Override
    protected void initData() {

    }
}
